﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DotNetNuke.Entities.Content;
using DotNetNuke.Common.Utilities;
//using DotNetNuke.ComponentModel.DataAnnotations;

namespace RegistryManager.Components
{
    public class WishList : ContentItem
    //[Scope("ModuleID")]
    //[TableName("Revindex_Storefront_WishList")]
    //public class WishList
    {
        /// <summary>
        /// 
        /// </summary>
        public int WishListID { get; set; }

        public int UserID { get; set; }

        public string Name { get; set; }

        //public DateTime CreateDate { get; set; }

        //public DateTime? EventDate { get; set; }

        public string RegistrantFirstName { get; set; }

        public string RegistrantLastName { get; set; }

        public string Registrant2FirstName { get; set; }

        public string Registrant2LastName { get; set; }

        //public string ShippingPhone { get; set; }

        public string Email { get; set; }

        public string DisplayName { get; set; }

        /////<summary>
        ///// The portal where the article resides
        /////</summary>
        //public int PortalId { get; set; }

        /////<summary>
        ///// An integer for the user id of the user who created the task
        /////</summary>
        //public int CreatedByUserId { get; set; }

        ////Read Only Props
        /////<summary>
        ///// The username of the user who created the task
        /////</summary>
        //public string CreatedByUser
        //{
        //    get
        //    {
        //        return CreatedByUserId != 0 ? Entities.Users.UserController.GetUserById(PortalId, CreatedByUserId).Username : Null.NullString;
        //    }
        //}


        #region IHydratable Implementation

        public override void Fill(System.Data.IDataReader dr)
        {
            base.FillInternal(dr);

            WishListID = Null.SetNullInteger(dr["WishListID"]);
            UserID = Null.SetNullInteger(dr["UserID"]);
            Name = Null.SetNullString(dr["Name"]);
            //CreateDate = Null.SetNullDateTime(dr["CreateDate"]);
            //EventDate = Null.SetNullDateTime(dr["EventDate"]);
            RegistrantFirstName = Null.SetNullString(dr["RegistrantFirstName"]);
            RegistrantLastName = Null.SetNullString(dr["RegistrantLastName"]);
            Registrant2FirstName = Null.SetNullString(dr["Registrant2FirstName"]);
            Registrant2LastName = Null.SetNullString(dr["Registrant2LastName"]);
            //ShippingPhone = Null.SetNullString(dr["ShippingPhone"]);
            Email = Null.SetNullString(dr["Email"]);
            DisplayName = Null.SetNullString(dr["DisplayName"]);

        }

        public override int KeyID
        {
            get
            {
                return WishListID;
            }
            set
            {
                WishListID = value;
            }
        }

        #endregion
    }
}